import { createApp } from 'vue'
import App from './App.vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import 'element-plus/theme-chalk/dark/css-vars.css'
const app = createApp(App)
import router from './router'
import store from './store'
import './assets/css/style.css'
import Nav from './components/Nav.vue'
app.component('Nav', Nav)
import zhCn from 'element-plus/es/locale/lang/zh-cn'
app.use(ElementPlus,{locale: zhCn,})

app.config.globalProperties.$vueAppPath = process.env.VUE_APP_PATH;
function getToDay() {
	const now = new Date();
	const year = now.getFullYear();
	const month = String(parseInt(now.getMonth()) + 1).padStart(2, '0');
	const day = String(now.getDate()).padStart(2, '0');
	return `${year}-${month}-${day}`;
}
app.config.globalProperties.$getToDay = getToDay();

app.use(store).use(router).mount('#app')
